package com.zgc.demo.controller;

import com.zgc.demo.feign.ProviderFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test/consumer")
public class TestConsumerController {

    @Autowired
    private ProviderFeignClient providerFeignClient;


    @GetMapping("/service")
    public String service() {
        String content = providerFeignClient.service();
        System.out.println("content = " + content);
        return content;
    }
}
